Skip to content

Rebase Renovate PRs when main moves, and record the required checks - #208

Merged
wormeyman merged 1 commit into
mainfrom
chore/renovate-rebase-behind-base
Nov 8, 2026
Merged

wormeyman merged 1 commit into
mainfrom
chore/renovate-rebase-behind-base

Conversation

@wormeyman

@wormeyman wormeyman commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

Two changes to (.github/renovate.json5):

  1. rebaseWhen: "behind-base-branch". Renovate now rebases a bot PR when main moves, not only when it conflicts.
  2. The automerge note is up to date. It said the ProtectMain ruleset had no status-check rule (checked 2026-10-21). That is no longer true.

Why

  • Renovate's default (auto) only rebases behind-base PRs when automerge is on or the ruleset needs an up-to-date branch. Here automerge is off and the ruleset's strict policy is off. So chore(deps): update lint and format tooling #205 sat 3 commits behind main for more than 2.5 hours on 2026-11-02, with checks that ran against an old base. The cost is one extra CI run per open bot PR after each merge. At most 3 are open at once (prConcurrentLimit in the org preset).
  • gh api repos/FactoryGameFan/FactorioTools/rulesets/18139941 on 2026-11-02 shows ProtectMain now requires a pull request and both ci.yml checks, "Build front-end" and "Rust port". The strict policy is off, and the Admin role can bypass the rules. The note now says so. Of the three automerge conditions it lists, only "checks required" holds today.

How it was tested

  • renovate-config-validator --strict --no-global (renovate 44.199.0): Config validated successfully against 1 file(s).
  • Read Renovate's own source (workers/repository/update/branch/reuse.js) to confirm that auto falls back to conflicted when automerge is off and the branch rules do not require an up-to-date branch.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kd6o1asZ1umbDC4dVgANYJ

Summary by CodeRabbit

  • Chores
    • Renovate pull requests are now rebased when their branch falls behind the base branch.
    • Updated guidance clarifies the required CI checks and bypass behavior for the existing branch-protection ruleset.

Set rebaseWhen to behind-base-branch. With automerge off and the
ruleset's strict policy off, Renovate's default only rebased conflicted
PRs, so #205 sat 3 commits behind main for more than 2.5 hours on
2026-11-02. The cost is one extra CI run per open bot PR after each
merge, with at most 3 open.

Also fix the automerge note. It said ProtectMain had no status-check
rule (checked 2026-10-21). It now requires "Build front-end" and
"Rust port" and a pull request, with the strict policy off and the
Admin role as a bypass actor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Kd6o1asZ1umbDC4dVgANYJ
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 263cb78c-f1ea-43b9-be95-8355d0e7a83a
Commits

Reviewing files that changed from the base of the PR and between fb25a90 and e22e8e7.

Files selected for processing: 1
  • .github/renovate.json5

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The Renovate configuration updates comments about ProtectMain and sets Renovate to rebase bot pull requests when their branch falls behind the base branch.

Changes: Renovate configuration

Layer / File(s) Summary
Document ruleset settings and set rebase condition
.github/renovate.json5
The comments describe required CI checks, disabled strict status-check enforcement, and admin bypass. Renovate now rebases when a branch falls behind the base branch.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • FactoryGameFan/FactorioTools issue 41 tracks Renovate-created pull requests and provides a rebase action. The new rebase condition addresses the documented stale-branch behavior.
Merge Risk: Minimal · up to e22e8

The Renovate configuration change is ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the primary change: Renovate rebases its pull requests when the base branch advances. It also accurately mentions the recorded required checks.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@wormeyman
wormeyman merged commit 554a6d6 into main Nov 8, 2026
8 checks passed
@wormeyman
wormeyman deleted the chore/renovate-rebase-behind-base branch November 8, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant